package com.atguigu.springcloud.order.service;

import com.atguigu.springcloud.framework.common.api.ApiResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author lenovo
 * @version 1.0
 * @date 2020/11/17 14:02
 */
@Component
@FeignClient(value = "CLOUD-PAYMENT-SERVICE")
public interface PaymentFeignService {

    /**
     * 获取payment数据
     *
     * @param id
     * @return
     */
    @GetMapping("payment/get/{id}")
    ApiResult getPaymentById(@PathVariable("id") Long id);


    /**
     * openFeign 超时请求
     *
     * @return
     */
    @GetMapping("payment/feign/timeout")
    String timeout();
}
